/* 基础样式 */
.lap-container {
  --primary-color: #2c3e50;
  --secondary-color: #ecf0f1;
  --progress-height: 5px;
  --border-radius: 8px;
  --text-primary: #333;
  --text-secondary: #666;

  font-family: system-ui, sans-serif;
  background: var(--secondary-color);
  border-radius: var(--border-radius);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  width: 800px;
  max-width: 90%;
  margin: 20px auto;
  overflow: hidden;
  transition: all 0.3s ease;
}

/* 悬浮模式 */
.lap-container.floating-mode {
  position: fixed;
  resize: both;
  cursor: move;
  min-width: 300px;
  min-height: 150px;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

/* 头部控制栏 */
.lap-header {
  padding: 10px;
  background: rgba(0,0,0,0.05);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

.lap-minimize, .lap-close {
  background: none;
  border: none;
  font-size: 1.2em;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.lap-minimize:hover, .lap-close:hover {
  opacity: 1;
}

/* 封面和可视化 */
.lap-cover-container {
  position: relative;
  aspect-ratio: 1;
  background: #ddd;
  overflow: hidden;
}

.lap-cover-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s;
}

.lap-cover-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  border: 3px solid var(--primary-color);
  border-radius: 50%;
  border-top-color: transparent;
  animation: lap-spin 1s linear infinite;
  opacity: 0;
}

@keyframes lap-spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.lap-visualizer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 30%;
  background: linear-gradient(to top, rgba(0,0,0,0.3), transparent);
}

/* 信息展示区 */
.lap-info-container {
  padding: 20px;
}

.lap-title {
  font-size: 1.5em;
  font-weight: bold;
  color: var(--text-primary);
  margin-bottom: 5px;
}

.lap-artist {
  color: var(--text-secondary);
  margin-bottom: 15px;
}

/* 进度条 */
.lap-progress-container {
  margin: 15px 0;
}

.lap-progress {
  width: 100%;
  height: var(--progress-height);
  accent-color: var(--primary-color);
  cursor: pointer;
}

.lap-time-display {
  display: flex;
  justify-content: space-between;
  font-size: 0.9em;
  color: var(--text-secondary);
  margin-top: 5px;
}

/* 控制按钮 */
.lap-controls {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
}

.lap-play-pause {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--primary-color);
  color: white;
  font-size: 1.2em;
  cursor: pointer;
  transition: transform 0.2s;
}

.lap-play-pause:hover {
  transform: scale(1.1);
}

.lap-volume {
  width: 100px;
  accent-color: var(--primary-color);
}

/* 歌词容器 */
.lap-lyrics-container {
  max-height: 200px;
  overflow-y: auto;
  padding: 10px 20px;
  font-size: 1.1em;
  line-height: 1.5;
}

.lap-lyric {
  margin: 10px 0;
  opacity: 0.6;
  transition: opacity 0.3s;
}

.lap-lyric.active {
  opacity: 1;
  color: var(--primary-color);
  font-weight: bold;
}

/* 播放列表 */
.lap-playlist {
  border-top: 1px solid rgba(0,0,0,0.1);
  max-height: 300px;
  overflow-y: auto;
}

.lap-playlist-track {
  padding: 10px 20px;
  cursor: pointer;
  transition: background 0.2s;
}

.lap-playlist-track:hover {
  background: rgba(0,0,0,0.05);
}

.lap-playlist-track.active {
  background: var(--primary-color);
  color: white;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .lap-container {
    width: 100%;
    margin: 0;
    border-radius: 0;
  }

  .lap-main {
    flex-direction: column;
  }

  .lap-cover-container {
    width: 100%;
    height: auto;
  }
}

/* 主题系统 */
.lap-theme-dark {
  --primary-color: #3498db;
  --secondary-color: #2c3e50;
  --text-primary: #ecf0f1;
  --text-secondary: #bdc3c7;
}

.lap-theme-minimal {
  --primary-color: #e74c3c;
  --secondary-color: #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  border: 1px solid #ddd;
}